package org.lboot.flow.module.process;


import org.lboot.jpa.service.*;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface FlowProcessService extends UniService<FlowProcess,String> {
    /**
     * 根据流程实例ID删除
     * @param flowWorkId
     */
    @Transactional
    void deleteByFlowWorkId(String flowWorkId);

    /**
     * 根据谓词查询
     * @param specification
     * @return
     */
    List<FlowProcess> getAll(Specification<FlowProcess> specification);

    /**
     * 根据流程ID列表查询
     * @param ids
     * @return
     */
    List<FlowProcess> getByFlowIds(List<String > ids);
}
